<%@page contentType="text/html; charset=utf-8" pageEncoding="utf-8"
	isELIgnored="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />

<title>电商平台后台管理</title>
<link rel="stylesheet" href="css/bootstrap.css" />
<link rel="stylesheet" href="css/bootstrap-responsive.css" />
<link rel="stylesheet" href="css/styles.css" />
<link rel="stylesheet" href="css/toastr.css" />
<link rel="stylesheet" href="css/fullcalendar.css" />
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.knob.js"></script>
<script src="js/jquery.sparkline.min.js"></script>
<script src="js/toastr.js"></script>
<script src="js/jquery.tablesorter.min.js"></script>
<script src="js/jquery.peity.min.js"></script>
<script src="js/fullcalendar.min.js"></script>
<script src="js/gcal.js"></script>
<script src="js/setup.js"></script>
<script type="text/javascript">
	$(function() {
		//异步访问
		$.ajax({
			url : "findThree.category",
			dataType : "json",
			success : function(categories) {
				for (i = 0; i < categories.length; i++) {
					var c = categories[i];
					$("<option value='"+c.id+"'>" + c.name + "</option>")
							.appendTo("#findThree");

				}
			}
		});
		//修改价格
		$("#normalprice").blur(
				function() {
					$("#memberprice").val(
							Math.round($(this).val() * .8 * 100.0) / 100.0);
				});
	});
</script>
<style type="text/css">
#search {
	position: relative;
	top: - 5px;
}
</style>

</head>
<body>
	<!-- header部分 -->
	<%@include file="header.jsp"%>
	<div class="page">
		<div class="page-container">
			<div class="container">
				<div class="row">
					<div class="span12">
						<h4 class="header">订单列表</h4>
						<form action="search.order" method="post">
							<input type="text" name="name" class="form-control"
								placeholder="请输入搜索关键字">&nbsp; <input
								class="btn btn-info" type="submit" value="搜索">
						</form>

						<table class="table table-striped sortable">
							<thead>
								<tr>
									<th>用户名</th>
									<th>商品名称</th>
									<th>送货地址</th>
									<th>商品类别</th>
									<th>订单号</th>
									<th>数量</th>
									<th>价格</th>
								</tr>
							</thead>
							<tbody>

								<c:forEach items="${orders }" var="o">

									<tr>
										<td>${o.user.name }</td>
										<td>${o.product.name }</td>
										<td>${o.addr }</td>
										<td>${o.product.category.name }</td>
										<td>${o.orderId }</td>
										<td>${o.cartitem.pcount }</td>
										<td>${o.cartitem.memberprice }</td>

									</tr>
								</c:forEach>

							</tbody>
						</table>
						<div class="pagination pagination-centered">
							<ul>
								<li class="disabled"><a href="#">&laquo;</a></li>
								<li class="active"><a href="#">1</a></li>
								<li><a href="#">2</a></li>
								<li><a href="#">3</a></li>
								<li><a href="#">4</a></li>
								<li><a href="#">5</a></li>
								<li><a href="#">&raquo;</a></li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<%@include file="footer.jsp"%>
</body>
<script src="js/d3-setup.js"></script>
</html>